<template>
	<view class="layout">
		<view class="top">
			<image class="top-img" src="/common/image/banner1.jpg" mode="aspectFill"></image>
		</view>
		<view class="content">
			
			<grid-work v-for="(item,index) in partListData" :partList="getNewData(item)">
				<template #left>{{item.name||无数据}}</template>
				<!-- <template #right>
					<navigator url="" class="more">More+</navigator>
				</template> -->
			</grid-work>
		</view>
	</view>
</template>

<script setup>
import {computed, ref} from 'vue'
const partListData = ref([])
const indexObj = uniCloud.importObject('indexObj')

const getData = async ()=>{
	let {data} = await indexObj.getListData()
	partListData.value = data
}
const getNewData = computed(()=>{
	return (item) => item._id?.['zw-categories-class'] || [];
})
	

getData()
</script>

<style lang="scss" scoped>
	.layout{
		width: 750rpx;
		padding: 30rpx;
		.top{
			width: 100%;
			height: 340rpx;
			image{
				width: 100%;
				height: 100%;
				border-radius: 15rpx;
			}
		}
		.content{
			padding-top: 20rpx;
			.more{
				font-size: 28rpx;
				color: #888;
			}
		}
	}
</style>
